<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Returns information about all connection pools</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="mongopool.getsize.html">« MongoPool::getSize</a></li>
      <li style="float: right;"><a href="mongopool.setsize.html">MongoPool::setSize »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="class.mongopool.html">MongoPool</a></li>
    <li>Returns information about all connection pools</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="mongopool.info" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">MongoPool::info</h1>
  <p class="verinfo">(PECL mongo &gt;= 1.2.3)</p><p class="refpurpose"><span class="refname">MongoPool::info</span> &mdash; <span class="dc-title">Returns information about all connection pools</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-mongopool.info-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>MongoPool::info</strong></span>(): <span class="type">array</span></div>


  <p class="para rdfs-comment">
   Returns an array of information about all connection pools.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-mongopool.info-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">This function has no parameters.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-mongopool.info-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Each connection pool has an identifier, which starts with the host. For each
   pool, this function shows the following fields:
   <dl>

    
     <dt>

      <code class="parameter">in use</code>
     </dt>

     <dd>

      <p class="para">
       The number of connections currently being used by
       <a href="class.mongo.html" class="classname">Mongo</a> instances.
      </p>
     </dd>

    
    
     <dt>

      <code class="parameter">in pool</code>
     </dt>

     <dd>

      <p class="para">
       The number of connections currently in the pool (not being used).
      </p>
     </dd>

    
    
     <dt>

      <code class="parameter">remaining</code>
     </dt>

     <dd>

      <p class="para">
       The number of connections that could be created by this pool. For
       example, suppose a pool had 5 connections remaining and 3 connections in
       the pool.  We could create 8 new instances of
       <a href="class.mongoclient.html" class="classname">MongoClient</a> before we exhausted this pool
       (assuming no instances of <a href="class.mongoclient.html" class="classname">MongoClient</a> went out of
       scope, returning their connections to the pool).
      </p>
      <p class="para">
       A negative number means that this pool will spawn unlimited connections.
      </p>
      <p class="para">
       Before a pool is created, you can change the max number of connections by
       calling <span class="function"><a href="mongo.setpoolsize.html" class="function">Mongo::setPoolSize()</a></span>. Once a pool is showing
       up in the output of this function, its size cannot be changed.
      </p>
     </dd>

    
    
     <dt>

      <code class="parameter">total</code>
     </dt>

     <dd>

      <p class="para">
       The total number of connections allowed for this pool.  This should be
       greater than or equal to &quot;in use&quot; + &quot;in pool&quot; (or -1).
      </p>
     </dd>

    
    
     <dt>

      <code class="parameter">timeout</code>
     </dt>

     <dd>

      <p class="para">
       The socket timeout for connections in this pool. This is how long
       connections in this pool will attempt to connect to a server before
       giving up.
      </p>
     </dd>

    
    
     <dt>

      <code class="parameter">waiting</code>
     </dt>

     <dd>

      <p class="para">
       If you have capped the pool size, workers requesting connections from
       the pool may block until other workers return their connections. This
       field shows how many milliseconds workers have blocked for connections to
       be released.  If this number keeps increasing, you may want to use
       <span class="function"><a href="mongopool.setsize.html" class="function">MongoPool::setSize()</a></span> to add more connections to your
       pool.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 changelog" id="refsect1-mongopool.info-changelog">
  <h3 class="title">Changelog</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Version</th>
       <th>Description</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>PECL mongo 1.2.11</td>
       <td>Emits <strong><code>E_DEPRECATED</code></strong> when used.</td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


</div></div></div></body></html>